package mil.af.amc.adpetracker.service;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * Encapsulates a key and an array of Object arguements for localized message construction
 *
 * @author SrA James Smith
 */
public class ServiceException extends Exception {

    private static Log log = LogFactory.getLog(ServiceException.class);

    private String key;
    private Object[] args;

    public String getKey() {
        return key;
    }

    public Object[] getArgs() {
        return args;
    }

    public ServiceException(Exception cause) {
        super(cause);    
    }

    public ServiceException(String key, String message) {
        super(message);
        this.key = key;
    }

    public ServiceException(String key, Object[] args, String message) {
        super(message);
        this.key = key;
        this.args = args;
    }

    public ServiceException(String key, Exception cause) {
        super(key, cause);
        this.key = key;
    }

    public ServiceException(String key, Object[] args, Exception cause) {
        super(key, cause);
        this.key = key;
        this.args = args;
    }

}
